#!usr/bin/env python  
# -*- coding:utf-8 -*-
""" 
@author:robot
@file: move.py 
@version:
@time: 2024/01/16

- 1 a-b
- 2 a-c
- 1 b-c
"""


class Solution:
    def __init__(self):
        self.time = 0

    def print(self, n, a, c):
        self.time += 1
        print(f'{self.time} {n} {a}-{c}')

    def move(self, n, a, b, c):
        if n == 1:
            self.print(n, a, c)
        else:
            self.move(n - 1, a, c, b)
            self.print(n, a, c)
            self.move(n - 1, b, a, c)


Solution().move(3, 'a', 'b', 'c')
